//
//  HYSalonHotTableViewCell.m
//  KaiJing
//
//  Created by lanou on 16/1/16.
//  Copyright © 2016年 HuangZuCui. All rights reserved.
//

#import "HYSalonHotTableViewCell.h"
#import "UIView+WLFrame.h"
@implementation HYSalonHotTableViewCell

- (instancetype) initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        _name = [[UILabel alloc] initWithFrame:CGRectMake(10, 10, kScreenWidth / 3, 30)];
       // _name.backgroundColor = kRandomClolor;
        [self.contentView addSubview:_name];
        
        _dateline = [[UILabel alloc] initWithFrame:CGRectMake(kScreenWidth - 80, _name.top, 70, _name.height)];
        _dateline.font = [UIFont systemFontOfSize:13];
       // _dateline.backgroundColor = kRandomClolor;
        [self.contentView addSubview:_dateline];
        
        
        _message = [[UILabel alloc] initWithFrame:CGRectMake(_name.left, _name.bottom + 10, kScreenWidth - 20, 80)];
       // _message.backgroundColor = kRandomClolor;
        _message.textAlignment = NSTextAlignmentCenter;
        _message.numberOfLines = -1;
        [self.contentView addSubview:_message];
        
        
        //点赞等
        _bottomView = [[CJCellBottomView alloc] initWithFrame:CGRectMake(0, _message.bottom + 15, kScreenWidth, 25)];
        
        
        //点赞
        [_bottomView.praiseButton setImage:[UIImage imageNamed:@"parise_norml"] forState:(UIControlStateNormal)];
        [_bottomView.praiseButton setImage:[UIImage imageNamed:@"parise_select"] forState:(UIControlStateSelected)];
        _bottomView.praiseLabel.text = @"赞";
        //评论
        [_bottomView.commentButton setImage:[UIImage imageNamed:@"comment"] forState:(UIControlStateNormal)];
        _bottomView.commentLabel.text = @"评论";
        
        //更多
        [_bottomView.moreButton setImage:[UIImage imageNamed:@"more"] forState:(UIControlStateNormal)];
        
        [_bottomView.moreButton addTarget:self action:@selector(moreButton:) forControlEvents:(UIControlEventTouchUpInside)];
        [self.contentView addSubview:_bottomView];
        
     
        
    }
    return self;
}

- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
